Repository navigation
chore: drop unused deps and align shared ones with consumers - #891
Conversation
metascraper-audio, metascraper-video and metascraper-media-provider declared p-reflect, p-retry and p-timeout without requiring them. Their majors (p-retry 8, p-timeout 7) were the only copies of those versions in microlink-api, next to the p-retry 4 of browserless and html-get. @metascraper/helpers moves tldts to ~7.5.4, the range microlink-api already uses, so both resolve to one copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
browserless (5 packages), keyv-s3 and microlink-api use p-reflect 2; @browserless/errors, @keyvhq/offline, isolated-function and microlink-api use serialize-error 8. metascraper-iframe, metascraper-telegram and metascraper-media-provider were the only consumers of p-reflect 3 and serialize-error 13, so a consumer installed both majors of each. p-reflect 2 and 3 resolve to the same shape. media-provider only prints the serialized error in a debug line, so serialize-error 13's NonError and cause handling are not needed there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
youtube-dl-exec's postinstall asks the GitHub API for the yt-dlp release. pull_request.yml passes GITHUB_TOKEN to pnpm install, main.yml did not, so master runs hit the anonymous runner-IP rate limit and the release job for #891 failed at Install twice. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What changed
metascraper-audio,metascraper-video: dropp-reflect(declared, never required).metascraper-media-provider: dropp-reflect,p-retry,p-timeout(declared, never required);serialize-error~13.0.2→~8.1.0.metascraper-iframe,metascraper-telegram:p-reflect~3.1.0→~2.1.0(plainrequire, no.default).@metascraper/helpers:tldts~7.4.18→~7.5.4.Why
In microlink-api, metascraper was the only source of a second major of each of these:
p-retryp-timeoutp-reflectserialize-errortldtsMoving the api and browserless up instead would change behavior: serialize-error 13 serializes non-errors to
NonErrorand addscause/nested errors, and the api returns that payload to function callers. Here it only formats a debug line. p-reflect 2 and 3 return the same{ isFulfilled, isRejected, value, reason }.mime(helpers on 4, browserless/api on 3) is left as is:getExtension('image/jpeg')isjpegon 3 andjpgon 4, so either direction changes output. That is decided separately.How it was tested
pnpm test:metascraper-helpers80 passed,metascraper-audio28,metascraper-video23,metascraper-iframe18,metascraper-telegram9.metascraper-media-provider: 9 failures, identical set on unmodifiedmaster(live-network yt-dlp tests; binary not downloaded with--ignore-scripts); the retry/serialize test ("keep retrying youtube unsupported errors until retry limit") passes.standardclean on every touched package.🤖 Generated with Claude Code
Note
Low Risk
Dependency-only housekeeping with intentional downgrades chosen because runtime behavior stays equivalent for
p-reflectand debug-onlyserialize-errorusage.Overview
Trims the dependency tree by removing
p-reflectfrommetascraper-audioandmetascraper-videowhere it was declared but never imported, and by removing unusedp-reflect,p-retry, andp-timeoutfrommetascraper-media-provider.Aligns versions with the rest of the microlink stack:
p-reflectis pinned to~2.1.0inmetascraper-iframeandmetascraper-telegram, with imports switched fromrequire('p-reflect').defaulttorequire('p-reflect');serialize-errorinmetascraper-media-providermoves from~13to~8.1.0; and@metascraper/helpersbumpstldtsfrom~7.4.18to~7.5.4.Reviewed by Cursor Bugbot for commit 07c7c90. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit